#include<iostream>
#include<algorithm>
using namespace std;

string s1, s2, ret;
int len1, len2;

bool fight(string& s1, string& s2)
{
	if (s1.size() != s2.size()) return s1.size() < s2.size();
	else return s1 < s2;
}
int main()
{
	cin >> s1 >> s2;
	if (fight(s1, s2))
	{
		swap(s1, s2);
		cout << "-";
	}
	reverse(s1.begin(), s1.end());
	reverse(s2.begin(), s2.end());
	len1 = s1.size(), len2 = s2.size();
	int num = 0;
	for (int i = 0; i < max(len1, len2); i++)
	{
		int x = (i < len1) ? s1[i] - '0' : 0;
		int y = (i < len2) ? s2[i] - '0' : 0;
		num += x - y;
		if (num < 0)
		{
			ret += num + 10 + '0';
			num = -1;
		}
		else ret += num + '0';
	}
	reverse(ret.begin(), ret.end());
	int i = 0;
	while (ret[i] == '0') i++;
	if (i == ret.size()) cout << "0";
	else for (; i < ret.size(); i++) cout << ret[i];
	return 0;
}